An Approach to Formal Verification of Arithmetic Functions in Assembly

نویسندگان

  • Reynald Affeldt
  • Nicolas Marti
چکیده

It is customary to write performance-critical parts of arithmetic functions in assembly: this enables finely-tuned algorithms that use specialized processor instructions. However, such optimizations make formal verification of arithmetic functions technically challenging, mainly because of many bit-level manipulations of data. In this paper, we propose an approach for formal verification of arithmetic functions in assembly. It consists in the implementation in the Coq proof assistant of (1) a Hoare logic for assembly programs augmented with loops and (2) a certified translator to ready-to-run assembly with jumps. To properly handle formal verification of bit-level manipulations of data, we propose an original encoding of machine integers. For concreteness, we use the SmartMIPS assembly language, an extension of the MIPS instruction set for smartcards, and we explain the formal verification of an optimized implementation of the Montgomery multiplication, a de facto-standard for the implementation of many cryptosystems.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Toward Formal Construction of Assembly Arithmetic Functions from Pseudo-code∗

Most cryptographic software relies on arithmetic functions, and these functions must be implemented correctly and efficiently. In practice, they are written by hand directly in assembly and undergo costly testing. Proof-assistants provide a way to avoid testing without sacrificing efficiency, but formal verification of low-level code is technically difficult. We propose a way to address the sca...

متن کامل

Formal Verification of Arithmetic Functions in SmartMIPS Assembly∗

In embedded systems, the recent trend is to manufacture processors with application-specific extensions. This makes it often necessary to write assembly programs to take advantage of the added hardware facilities. In such situations, formal verification is technically difficult because the programs in question manipulate data in a bitwise fashion, using non-standard specialized instructions, an...

متن کامل

A short introduction to two approaches in formal verification of security protocols: model checking and theorem proving

In this paper, we shortly review two formal approaches in verification of security protocols; model checking and theorem proving. Model checking is based on studying the behavior of protocols via generating all different behaviors of a protocol and checking whether the desired goals are satisfied in all instances or not. We investigate Scyther operational semantics as n example of this...

متن کامل

A Formal Approach to Verification of Linear Analog Circuits with Parameter Tolerances

a circuit with tolerance parameter fulfills a certain specification for all parameter combinations, because the tolerance parameters are modelled with a probabilistic density function, or the computed regions are non pessimistic approximations like convex polyhedrons. In contrast to the above, the proposed approach deals with intervals, enabling an exact proof of the correctness of the design. ...

متن کامل

Implementation of Interval Arithmetic in CORA 2016 (Tool Presentation)

Interval arithmetic can be seen as one of the workhorses for formal verification approaches. The popularity of interval arithmetic stems from the fact that the possible outcomes of almost all frequently occurring mathematical expressions can be bounded. A disadvantage of interval arithmetic is that due to the negligence of dependencies of variables in expressions, results can be overly conserva...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006